package cn.ryanpenn.javafx.samples.javafxui;

import javafx.beans.property.SimpleStringProperty;

/**
 * Employee
 */
public class Employee {
    private SimpleStringProperty name;
    private SimpleStringProperty email;

    public SimpleStringProperty nameProperty() {
        if (name == null) {
            name = new SimpleStringProperty(this, "name");
        }
        return name;
    }

    public SimpleStringProperty emailProperty() {
        if (email == null) {
            email = new SimpleStringProperty(this, "email");
        }
        return email;
    }

    public Employee(String name, String email) {
        this.name = new SimpleStringProperty(name);
        this.email = new SimpleStringProperty(email);
    }

    public String getName() {
        return name.get();
    }

    public void setName(String fName) {
        name.set(fName);
    }

    public String getEmail() {
        return email.get();
    }

    public void setEmail(String fName) {
        email.set(fName);
    }
}
